#ifndef CHANGEPASSWORDWINDOW_H
#define CHANGEPASSWORDWINDOW_H

#include <QDialog>
#include <QLineEdit>
#include <QPushButton>
#include <QVBoxLayout>
#include <QHBoxLayout>
#include <QLabel>
#include <QMessageBox>
#include "database.h"

class ChangePasswordWindow : public QDialog
{
    Q_OBJECT

public:
    explicit ChangePasswordWindow(const QString &username, Database *db, QWidget *parent = nullptr);
    ~ChangePasswordWindow();

private slots:
    void onChangeClicked();
    void onCancelClicked();

private:
    void setupUI();
    void createConnections();

    QString username;
    Database *db;
    QLineEdit *oldPasswordEdit;
    QLineEdit *newPasswordEdit;
    QLineEdit *confirmPasswordEdit;
    QPushButton *changeButton;
    QPushButton *cancelButton;
};

#endif // CHANGEPASSWORDWINDOW_H 
